(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'HdImage',
	title = '插入图片',
	setValue = '<span id="_testHdimage"></span>',
	dom = null,
	node = null,
	cmds = [
		[1500, {fun: function() {
			dom = E.get('document');
			dom.body.innerHTML=setValue;
			node = dom.getElementById('_testHdimage');
			selection.selectNode(node, false);
		}}],
		[500, {name : '#demo-HdImage', type: 'mouseover'}],
		[500, {name : '#demo-HdImage a.HdImage', type: 'click'}],
		[500, {name : '#panel_HdImage span[name=urlFileBtn]', type: 'click'}],
		[500, {name : '#panel_HdImage input[name=uploadButton]', type: 'click'}],
		[500, {fun: function() {
			$('#panel_HdImage input[name=img_url]').val('http://static.hudong.com/market/503.gif');
		}}],
		[500, {name : '#panel_HdImage input[name=uploadButton]', type: 'click'}],
		[500, {fun: function() {
			$('#panel_HdImage textarea[name=picAlt]').val('插入测试图片');
		}}],
		[500, {name : '#panel_HdImage input[imgsize=_140]', type: 'click'}],
		[500, {name : '#panel_HdImage input[name=picAlign][value=left]', type: 'click'}],
		[500, {name : '#panel_HdImage input[name=uploadButton]', type: 'click'}],
		[2000, {fun: function(){//做个延时，防止图片为上传完就结束测试
			return true;
		}}]
	];

T.addTest(testName, cmds, title);
})(jQEditor,AutoTest, jQuery)